home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Utilities / PalmLink / src / palmlink_private.h < prev    next >
C/C++ Source or Header  |  2000-05-06  |  4KB  |  150 lines

  1. /**
  2.  * PalmLink -- Connect 3Com Palm with Amiga
  3.  *
  4.  * Private headers
  5.  *
  6.  * (C) 1998-2000 Richard Körber <rkoerber@gmx.de>
  7.  *
  8.  *------------------------------------------------------------------
  9.  *
  10.  * This program is free software; you can redistribute it and/or modify
  11.  * it under the terms of the GNU General Public License as published by
  12.  * the Free Software Foundation; either version 2 of the License, or
  13.  * any later version.
  14.  *
  15.  * This program is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.  * GNU General Public License for more details.
  19.  *
  20.  * You should have received a copy of the GNU General Public License
  21.  * along with this program; if not, write to the Free Software
  22.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  *
  24.  * You must not use this source code to gain profit of any kind!
  25.  */
  26.  
  27.  
  28. #ifndef PALMLINK_PRIVATE_H
  29. #define PALMLINK_PRIVATE_H
  30.  
  31. #include <exec/io.h>
  32. #include <exec/lists.h>
  33. #include <exec/memory.h>
  34. #include <exec/nodes.h>
  35. #include <exec/semaphores.h>
  36. #include <clib/exec_protos.h>
  37. #include <clib/dos_protos.h>
  38.  
  39.  
  40. struct RexxHandle
  41. {
  42.   struct Node rh_node;
  43.   APTR rh_handle;
  44.   unsigned char rh_name[0];
  45. };
  46.  
  47.  
  48. struct PL_FileHeader
  49. {
  50.   char name[32];
  51.   UWORD flags;
  52.   UWORD version;
  53.   ULONG creationTime;
  54.   ULONG modificationTime;
  55.   ULONG backupTime;
  56.   ULONG modificationNr;
  57.   ULONG appInfoOffset;
  58.   ULONG sortInfoOffset;
  59.   ULONG type;
  60.   ULONG creator;
  61.   ULONG uniqueID;
  62.   ULONG nextRecordListID;
  63.   UWORD numRecords;
  64. };
  65.  
  66. struct PL_ResEntryHeader
  67. {
  68.   ULONG type;
  69.   UWORD id;
  70.   ULONG offset;
  71. };
  72.  
  73. struct PL_RecEntryHeader
  74. {
  75.   ULONG offset;
  76.   UBYTE attrs;
  77.   UBYTE uid[3];
  78. };
  79.  
  80. struct PL_Entry
  81. {
  82.   struct MinNode node;
  83.   APTR  entryData;
  84.   ULONG offset;
  85.   ULONG size;
  86.   ULONG type;
  87.   UWORD id;
  88.   ULONG uid;
  89.   UBYTE attrs;
  90. };
  91.  
  92. struct PL_File
  93. {
  94.   BPTR fh;                      /* File handle to the Palm file */
  95.   STRPTR filename;              /* Copy of file name */
  96.   BOOL  resourceFlag;
  97.   BOOL  forWriteFlag;
  98.   ULONG size;                   /* Size of file */
  99.   struct DLP_DBInfo dbinfo;     /* Database info */
  100.   ULONG uniqueID;
  101.   ULONG nextRecordListID;
  102.   UWORD numRecords;
  103.   UWORD entHeaderSize;
  104.   struct MinList entries;       /* List of all entries */
  105.   ULONG cntEntries;
  106.   APTR appInfo;
  107.   ULONG appInfoSize;
  108.   APTR sortInfo;
  109.   ULONG sortInfoSize;
  110. };
  111.  
  112.  
  113. struct PL_Serial
  114. {
  115.   struct MsgPort *serport;      /* Message port for interface */
  116.   struct IOExtSer *serio;       /* IO structure for interface */
  117.   struct MsgPort *timerport;    /* Message port for timer */
  118.   struct timerequest *timerio;  /* IO structure for timer */
  119.   struct Device *timerbase;     /* Base of timer device */
  120.   ULONG  currBaud;              /* Current baud rate */
  121. };
  122.  
  123.  
  124. #define PLCMPVER_1_0  (0x0100)  /* V1.0 */
  125. #define PLCMPVER_2_0  (0x0101)  /* V2.0 */
  126.  
  127. struct PL_Socket
  128. {
  129.   LONG   lastError;             /* Last Error Code */
  130.   struct PL_Serial *serial;     /* Serial Connection */
  131.   ULONG  timeout;               /* Timeout (s) */
  132.   ULONG  baudRate;              /* Baud rate between Palm and Amiga */
  133.   ULONG  maxRate;               /* Amiga's maximum baud rate */
  134.   UBYTE *dlpbuffer;             /* Buffer for DLP data */
  135.   LONG   dlpoffset;             /* Data offset/length*/
  136.   LONG   readoffset;            /* read DLP: starting position */
  137.   UBYTE  transactionID;         /* Current Transaction ID */
  138.   BYTE   initiator;             /* TRUE: transaction initiator */
  139.   UWORD  version;               /* Version of Remote */
  140.   UWORD  dlprecord;             /* Current DLP record */
  141.   ULONG  abortmask;             /* Abort Mask, e.g. CTRL-C */
  142. };
  143.  
  144.  
  145.  
  146.  
  147.  
  148. #endif
  149.  
  150.